package org.ipp4j.core.standard;

public enum State {

	/**
	 * An error occurred
	 */
	ERROR(-1),
	
	/**
	 * Nothing is happing/request completed
	 */
	IDLE(0x00),
	
	/**
	 * The request header needs to be sent/received
	 */
	HEADER(0x01),
	
	/**
	 * One or more attributes need to be sent/received
	 */
	ATTRIBUTE(0x02),
	
	/**
	 * IPP request data needs to be sent/received
	 */
	DATA(0x03);
	
	int code;
	
	State(int code) {
		this.code = code;
	}
	
	public byte getCode() {
		return (byte) (code & 0xFF);
	}
}
